package com.hdy.javachatroomdemo.Model;

import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScans;

import java.util.List;

@Mapper
public interface SessionMapper {

    //通过本人id获取sessionId
    public List<Integer> getSessionByUserId(Integer userId);

    //通过sessionId获取friend
    public List<Friend> getFriendBySessionId(Integer sessionId, Integer selfUserId);

    //插入新的session会话,并获取到SessionId
    public int addSession(Session session);

    //通过上面获取到的sessionId ,将userId与friendId插入
    public void addSessionUser(SessionUser sessionUser);
}
